﻿#ifndef PST_DIALOGEVALUATIONSUBMISSION_H
#define PST_DIALOGEVALUATIONSUBMISSION_H

#include <IdaDialogFrame>
#include <QModelIndexList>
QT_BEGIN_NAMESPACE
namespace Ui
{
    class DialogEvaluationSubmission;
};
QT_END_NAMESPACE

namespace pst
{
    class DataChosenListDialog;
    class DialogEvaluationSubmission : public IdaDialogFrame
    {
        Q_OBJECT

    public:
        DialogEvaluationSubmission(QWidget* parent = nullptr);
        ~DialogEvaluationSubmission();
        void setCurveNameHash(const QMultiHash<int, QString> &curveNameHash);

    public slots:
        void on_pushButton_confirm_clicked();
        void on_pushButton_cancel_clicked();
        void slot_sentChosenDataIds(const QModelIndexList& chosenID);
        // 单选按钮
        void on_radioButton_Lightning_clicked();
        void on_radioButton_HIRF_clicked();
        void on_radioButton_Microwave_clicked();
        void on_radioButton_Pulse_clicked();

        // Pushbutton
        //void on_pushButton_Lightning_clicked();
        void on_pushButton_Lightning_port_current_clicked();
        void on_pushButton_Lightning_port_voltage_clicked();

        void on_pushButton_HIRFMeanElectric_clicked();
        void on_pushButton_HIRFPeakElectric_clicked();
        void on_pushButton_HIRFMeanCurrent_clicked();
        void on_pushButton_HIRFPeakCurrent_clicked();
        void on_pushButton_HIRFPortVoltage_clicked();
        void on_pushButton_HIRFCablePortVoltage_clicked();

        void on_pushButton_MicrowaveElectric_clicked();
        //void on_pushButton_MicrowaveCurrent_clicked();
        void on_pushButton_MicrowavePortVoltage_clicked();
        void on_pushButton_MicrowaveCablePortVoltage_clicked();

        void on_pushButton_PulseElectric_clicked();
        void on_pushButton_PulseCurrent_clicked();
        void on_pushButton_PulsePortVoltage_clicked();
        //void on_pushButton_PulseCablePortVoltage_clicked();

    signals:
        void signal_submitEvaluation(int emulationType, const QStringList& graphNameList);

    private:
        void openDataChosenListDialog(); // 打开数据选择框进行数据选择

    private:
        Ui::DialogEvaluationSubmission* ui;
        DataChosenListDialog* m_dataChosenListDialog;
        QMultiHash<int, QString> m_namesHash;
        QList<QString> m_currentNameList{};
        QList<int> m_selectedIndexs;

        // 雷电
        bool m_isPushButtonLightningClicked{false}; // 雷电电场按钮是否点击
        bool m_isPushButtonLightningPortCurrentClicked{false};
        bool m_isPushButtonLightningPortVoltageClicked{false};
        // HIRF
        bool m_isPushButtonHIRFMeanElectricClicked{false}; // HIRF均值电场
        bool m_isPushButtonHIRFPeakElectricClicked{false}; // HIRF峰值电场
        bool m_isPushButtonHIRFMeanCurrentClicked{false};  // HIRF均值电流
        bool m_isPushButtonHIRFPeakCurrentClicked{false};  // HIRF峰值电流
        bool m_isPushButtonHIRFPortVoltageClicked{false};  // HIRF峰值电流
        bool m_isPushButtonHIRFCablePortVoltageClicked{false}; // HIRF峰值电流
        // 高功率微波
        bool m_isPushButtonMicrowaveElectricClicked{false}; // 高功率微波电场
        bool m_isPushButtonMicrowaveCurrentClicked{false};  // 高功率微波电流
        bool m_isPushButtonMicrowavePortVoltageClicked{false}; // 高功率微波电流
        bool m_isPushButtonMicrowaveCablePortVoltageClicked{false}; // 高功率微波电流
        // 核电磁脉冲
        bool m_isPushButtonPulseElectricClicked{false}; // 核电磁脉冲电场
        bool m_isPushButtonPulseCurrentClicked{false};  // 核电磁脉冲电流
        bool m_isPushButtonPulsePortVoltageClicked{false}; // 核电磁脉冲电流
        bool m_isPushButtonPulseCablePortVoltageClicked{false}; // 核电磁脉冲电流
    };
} // namespace pst

#endif
